﻿/// Write a program for extracting all email addresses from given text. 
/// All substrings that match the format <identifier>@<host>…<domain> should be recognized as emails.


using System;
using System.Text.RegularExpressions;

class zad16
{
    static void Main()
    {
        string str = "mail list nakov.mmmmm@telerik.com. using System,nakov@gmail.com return";

        MatchCollection maches = Regex.Matches(str, @"\w+@\w+\.\w+");
        
        foreach (var item in maches)
        {
            Console.WriteLine(item);
        }
    }

}

